In a HDD, there are formed a plurality of tracks on the magnetic-recording disk. A magnetic-recording head is positioned over a target track selected from a plurality of tracks so that the track may be written with data. At this time, whether or not a track may be written with data is determined according to whether or not the position error of the magnetic-recording head is within a predetermined allowed range. However, the position error of the magnetic-recording head when writing data may fall outside of this predetermined allowed range, which can lead to degradation in write performance of the magnetic-recording head.